using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class so_gal_netremitMap : EntityTypeConfiguration<so_gal_netremit>
    {
        public so_gal_netremitMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.SectionString)
                .HasMaxLength(500);

            this.Property(t => t.SECTION_LABEL)
                .IsFixedLength()
                .HasMaxLength(3);

            this.Property(t => t.NET_FARE_NET_REMIT_CURRENCY_CODE)
                .IsFixedLength()
                .HasMaxLength(3);

            this.Property(t => t.NET_FARE_NET_REMIT_AMOUNT)
                .IsFixedLength()
                .HasMaxLength(12);

            this.Property(t => t.COMMERCIAL_AGREEMENT_REFERENCE)
                .IsFixedLength()
                .HasMaxLength(20);

            this.Property(t => t.VALUE_CODE)
                .IsFixedLength()
                .HasMaxLength(20);

            this.Property(t => t.ACTUAL_SELLING_FARE)
                .IsFixedLength()
                .HasMaxLength(12);

            this.Property(t => t.NET_FARE_REGION_CODE)
                .IsFixedLength()
                .HasMaxLength(3);

            // Table & Column Mappings
            this.ToTable("so_gal_netremit");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.reference).HasColumnName("reference");
            this.Property(t => t.SectionString).HasColumnName("SectionString");
            this.Property(t => t.MIR).HasColumnName("MIR");
            this.Property(t => t.SECTION_LABEL).HasColumnName("SECTION LABEL");
            this.Property(t => t.NET_FARE_NET_REMIT_CURRENCY_CODE).HasColumnName("NET FARE/NET REMIT CURRENCY CODE");
            this.Property(t => t.NET_FARE_NET_REMIT_AMOUNT).HasColumnName("NET FARE/NET REMIT AMOUNT");
            this.Property(t => t.COMMERCIAL_AGREEMENT_REFERENCE).HasColumnName("COMMERCIAL AGREEMENT REFERENCE");
            this.Property(t => t.VALUE_CODE).HasColumnName("VALUE CODE");
            this.Property(t => t.ACTUAL_SELLING_FARE).HasColumnName("ACTUAL SELLING FARE");
            this.Property(t => t.NET_FARE_REGION_CODE).HasColumnName("NET FARE REGION CODE");
        }
    }
}
